<a href="#addTournamentModal" role="button" class="btn" data-toggle="modal">
  Ajouter un tournoi
</a>
<br/>
<br/>
<!-- Modal -->
<div id="addTournamentModal" class="modal hide fade" tabindex="-1" role="dialog"
    aria-labelledby="myModalLabel" aria-hidden="true">
  <form onSubmit="return false;">    
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">close</button>
      <h3 id="myModalLabel">Ajouter un tournoi</h3>
    </div>
    <div class="modal-body">
      <table>
        <tr>
          <td>Year: </td>
          <td>
            <input type="text" name="year"/>
          </td>
        </tr>
        <tr>
          <td>Tournament name: </td>
          <td>
            <input type="text" name="tournamentName"/>
          </td>
        </tr>
        <tr>
          <td>Organizer: </td>
          <td>
            <input type="text" name="organizer"/>
          </td>
        </tr>
        <? 
          $allFields = getAllFields();
        ?>
        <tr>
          <td>Field Picture: </td>
          <td>
            <select name="fieldPicture">
            	  <option value="0">--</option>
            	<? for ($i = 0; $i < count($allFields); $i++) { ?>
              	<option value="<?=$allFields[$i]['idTournamentField'] ?>">
              	  <?=$allFields[$i]['fieldName'] ?>
              	</option>
            	<?php }?>
            <select/>
          </td>
        </tr>
      </table>
      <div id="outputAddTournamentForm"></div>
      <br/>
    </div>
    <div class="modal-footer">
      <button class="btn btn-primary" onClick="addTournament()">Add tournament</button>
    </div>
  </form>
</div>
